package dry.example.demo02;

import java.util.function.Function;

/**
 * @author zc
 */
public class FunctionExample {

    public static void yeWuCode(Function<String, String> f) {
        String input = "tom";
        String output = f.apply(input);
        System.out.println(output);
    }

    public static void main(String[] args) {
        //相当于传入一个自定义处理数据的方法到业务代码
        yeWuCode(s -> s.toUpperCase());
    }

}
